From: Carlos Garnacho Date: Sat, 29 Feb 2020 17:43:28 +0000 (+0100) Subject: ibusManager: Use setup X11 display for ibus-x11 X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~772^2^2~5 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=3c4a5a67e2952812d67473d640eff96600fbe93d;p=gnome-shell.git ibusManager: Use setup X11 display for ibus-x11 (re)spawning ibus to get ibus-x11 will be part atm of Xwayland initialization process. For it to be set up before the client it needs using the GNOME_SETUP_DISPLAY. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/836 --- diff --git a/js/misc/ibusManager.js b/js/misc/ibusManager.js index cc699c33c..2049758ea 100644 --- a/js/misc/ibusManager.js +++ b/js/misc/ibusManager.js @@ -61,7 +61,12 @@ var IBusManager = class { _spawn(extraArgs = []) { try { let cmdLine = ['ibus-daemon', '--panel', 'disable', ...extraArgs]; - Gio.Subprocess.new(cmdLine, Gio.SubprocessFlags.NONE); + let launcher = Gio.SubprocessLauncher.new(Gio.SubprocessFlags.NONE); + // Forward the right X11 Display for ibus-x11 + let display = GLib.getenv('GNOME_SETUP_DISPLAY'); + if (display) + launcher.setenv('DISPLAY', display, true); + launcher.launch(cmdLine); } catch (e) { log(`Failed to launch ibus-daemon: ${e.message}`); }